﻿using System;
using System.Drawing;

namespace Imager
{
    /// <summary>
    /// Description of ImageComponent.
    /// </summary>
    public class ImageComponent : ComponentOfImage
    {
        private Image image;

        public ImageComponent(Image img, int x1, int y1, int width, int heigth)
        {
            image = img;
            border = new Rectangle(x1, y1, width, heigth);
        }

        public override void Draw(Graphics gr)
        {
            gr.DrawImage(image, border.X, border.Y, border.Width, border.Height);
        }
    }
}